﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DCSLibrary;

public partial class Module_Control_ProductMenu : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindProductMenu();
        }
    }

    protected void BindProductMenu()
    {
        ProductUI objProduct = new ProductUI();
        DataSet ds = objProduct.GetAll();
        if (ds != null && ds.Tables.Count > 0)
        {
            grdProductMenu.DataSource = ds.Tables[0];
            grdProductMenu.DataBind();
        }
    }

    protected string SelectProductMenuStyle(string pageAlias)
    {
        if (Request.RawUrl.Trim().IndexOf(pageAlias.Trim()) != -1)
        {
            return "selected_product_item";
        }
        else
        {
            return "product_item";
        }
    }
}
